﻿#include "DoubleSpinBox.h"

#include <QWheelEvent>

DoubleSpinBox::DoubleSpinBox(QWidget *parent):QDoubleSpinBox(parent)
{
    setFocusPolicy(Qt::StrongFocus);
}


void DoubleSpinBox::wheelEvent(QWheelEvent *event)
{
    if (!hasFocus()) {
        event->ignore();
    } else {
        QDoubleSpinBox::wheelEvent(event);
    }
}

void DoubleSpinBox::mousePressEvent(QMouseEvent *event) {
    emit send_data(this->objectName(), QString::number(this->value()));
    QDoubleSpinBox::mousePressEvent(event);
}
